home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_oth
/
m2cmp20
/
storage.def
< prev
next >
Wrap
Text File
|
1988-11-19
|
824b
|
32 lines
DEFINITION MODULE Storage;
(* (C) Copyright 1987,1988 Fitted Software Tools. All rights reserved. *)
(*
This module manages the Modula-2 heap which is defined to be all
the memory between System.HeapTop and System.MemTop.
The Storage procedures will keep System.HeapTop up to date as
the heap expands or shrinks.
*)
FROM SYSTEM IMPORT ADDRESS;
PROCEDURE ALLOCATE( VAR a :ADDRESS; size :CARDINAL );
(*
allocates size bytes in the heap and returns a pointer to
that memory block in a.
*)
PROCEDURE DEALLOCATE( VAR a :ADDRESS; size :CARDINAL );
(*
returns a previously allocated memory block of size size
to the heap.
*)
PROCEDURE Available( size :CARDINAL ) :BOOLEAN;
(*
TRUE if a memory block of size size is available for allocation
*)
END Storage.